]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
inputMethod: Do not reset invisible preedit on focus_out
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 29 Oct 2021 14:46:18 +0000 (16:46 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 1 Nov 2021 17:02:50 +0000 (17:02 +0000)
If the preedit is in invisible state, the last preedit string that
was sent around is already null, so there is no need to clear the preedit
in that case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2011>

js/misc/inputMethod.js

index 71dff84f584747ebd6d1d49e8dcbe0c8f3017b60..8c3cd61aeb8387199866809ebdf1bbf73deb6d02 100644 (file)
@@ -167,7 +167,7 @@ class InputMethod extends Clutter.InputMethod {
         if (this._context)
             this._context.focus_out();
 
-        if (this._preeditStr) {
+        if (this._preeditStr && this._preeditVisible) {
             // Unset any preedit text
             this.set_preedit_text(null, 0, this._preeditCommitMode);
             this._preeditStr = null;